home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
EARCD
/
util
/
cli
/
into.lha
/
into.doc
next >
Wrap
Text File
|
1992-03-06
|
7KB
|
241 lines
Docs for Into tool by Iain King
Freely distibutable, and if you want you can send me stuff (anything nice)
What INTO does is let you feed a pattern of files into a program,
which is very handy for programs that do not support pattern matching
(I wanted this cause my sound player 'sound' doesnt). Its also handy for
batch processing. To use:
into PATTERN <options> | command <tags>
PATTERN is any dos standard pattern (#, ?, #?, ~, etc)
<options> - optional :), they are
QUIET - INTO displays no output except for requesters
SILENT - same as QUIET plus any output from the command is redirected to
NIL:
INCINFO - includes .info files for processing
DIRS - only processes directories
FILES - only processes files
ALL - processes directories recursively * very usefull!
QUIT=#
lets you select quit mode.
By default you can't quit (sorry), but adding one of these will solve the
prob:
QUIT=1 means holding dowm both mouse buttons between jobs will quit
QUIT=2 means holding down the joystick firebutton between jobs quits
mode 2 is best because it doesnt get muddled up with menus, then
again - you cant play games :)
If your using mode 1 it seems to work better if you repeatedly press the
buttons when you expect a job to finish. Sorry for it being kinda cack.
+CONFIRM - asks the user for confirmation on each job, <return>=yes
-CONFIRM - same as above but <return>=no
n.b. for confirmations, y=yes, n=no, a=all (i.e. everything else), s=skip
(skips everything else)
FILEKEY=### sets the filekey tag to ###
QUERYKEY=### sets the querykey tag to ###
these are to give greater flexibility for running commands (more later)
FROM=### make into get its list of names from the file ###
meaning you can create a list of files, like this one:
example file: name "flarp.list"
------snip------
foo.iff
bar.iff
baz.iff
quux.iff
------snip------
INTO will use each of these files for jobs, ignoring the given pattern
this could be used for a slide=show, i.e.:
INTO # FROM=flarp.list SILENT | vt
(Thanks to Daniele Carnino for reporting the bug in FROM)
HELP - small :) help text
INCSPACES - this determines how files with spaces in there name are
handled: more on this in the tags section
NOPATH - operates on the file name only - no path given
i.e. for the match : work:games/worms/wormsfile
using NOPATH will operate on : wormsfile
RELATIVE - filename operated on is given forwards relative to the current
directory.
i.e. if the current dir is : work:temp/
and match is : work:temp/stuff/thisfile
then the filename used= : stuff/thisfile
NOTE: only works forwards. If you specify a PATTERN the refers to a
directory either 'behind' or on a different device jiberish
will be returned : i.e.
into /#? all relative | echo ERROR!!!!!
into df0:#? all relative | echo ERROR if current disk is
not df0:
'|'
this must be a on its own with a space on either side - denotes start of
command.
command
Any DOS command, and its arguments i.e.
list dirs nohead
If INTO finds one of the parameters to contain the file tag or a query
tag then it:
If it finds a file tag it inserts the current job at that point (handy
for commands that are fidly for where you put a filename)
If it finds a query tag it stops and asks the user for input, using the
user input as parameters.
I.E.
using above example, you could set up:
INTO # FROM=flarp.list FILEKEY=£££ QUERYKEY=$$$ | vt £££ $$$
this would respond with:
Working on file foo.iff : <user input>
you then type in any options specific to that file
(fullscreen, window, whatever), it would then do
vt foo.iff fullscreen
and move onto the next file. NOTE you can include the tags into other
parameters:
For instance, to back up every file in a directory to an equivalent
backup file:
INTO #? INCINFO FILEKEY=! | copy ! !.back
for a directory:
foo
foo.info
bar.iff
bar.iff.info
would do
copy foo foo.back
copy foo.info foo.info.back
copy bar.iff bar.iff.back
copy bar.iff.info bar.iff.info.back
To give the backups icons (ie, to put the .back extension before the .info
extensions):
INTO #? FILEKEY=$ | copy $ $.back
INTO #? INCINFO FILEKEY=$ | copy $.info $.back.info
N.B. If no FILEKEY is given then the file is appened to the end of the
command. If given it is only inserted expletively - only when you tell it
to.
INCSPACES comes in here, for example:
INTO #? DIRS FILEKEY=$ | LIST $/
This would do a directory list of the contents of all the dirs in the cd.
However, if the current dir had a space in it, say its name is "foo bar",
then theis would result in:
LIST "foo bar"/
Which is not what you want. This is where INCSPACES comes in. If used
then the quotes will extend to surround all the current argument:
INTO #? DIRS FILEKEY=$ INCSPACES | LIST $/
would result in:
LIST "foo bar/"
perhaps the most powerful feature is the ability to move recursievly
through directories: Say you wanted to delete all backup (.bak) files on
your hard disk:
doing a
DELETE #?.bak all
does not work cause it wouldnt enter a directory unless it had a .bak
extension - and then it would delete it !!!
This would though
INTO #? DIRS ALL FILEKEY=$$$ | INTO $$$/#?.bak +CONFIRM | DELETE
. N.B., you dont need to use 2 INTOs, but this shows another use of
INTO - you can add confirmation to commands. The above could be done by:
INTO #? DIRS ALL FILEKEY=$$$ | DELETE $$$/#?.bak
but using the second INTO means that every file is prompted before deletion.
Some extra stuff:
Disclaimer: Sorry folks, but I cant and wont be held responsible for
any damage INTO does. It seems to work OK but it seemed to work very
quickly with basically no bugs, so watch yerselves and let me know if you
find any. Also, watch out - it is a very powerful file tool and you
could shoot yourself in the foot VERY easily ( the syntax is by nature
baroque, and its a hell of a lot easier to kill files than a simple
"delete #? all" mistake.
Note - because of the Way It Works, (or rather my lazy programing) INTO
can be quite RAM intensive. You are warned.
You can send me stuff (hey, I can ask cant I?) at :
Blairs Croft
Creetown
Newton Stewart
DG8 7DF
Scotland
Better still (unless your sending me money $-) or pressies) you can email
me with bug reports or suggestions at:
iking@cs.strath.ac.uk - ill be here (Hopefully) till about the year
2000!!!
Hope its handy